#-*- coding:utf-8 -*-
# @author: haorui
import MySQLdb
from settings import MYSQL_HOST, MYSQL_PORT, MYSQL_USER, MYSQL_PWD, MYSQL_DB

class db_manager():
	def __init__(self):
		self.conn = MySQLdb.connect(host=MYSQL_HOST, port=MYSQL_PORT, user=MYSQL_USER, passwd=MYSQL_PWD, db=MYSQL_DB, charset='utf8')
		self.cur = self.conn.cursor()

	def close(self):
		self.cur.close()
		self.conn.close()